package yesjava;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Test3 {
    public static void main(String[] args) {
//      数组
        Integer[] arr = {874, 8, 7, 2, 6, 45, 8, 5, 7, 5, 2, 9};
        List<Integer> integerList = Arrays.asList(arr); // 数组转集合
        Integer[] arrInteger = integerList.toArray(new Integer[]{}); // 集合转数组*/

        int[] arrInt = new int[arrInteger.length];
        for (int i = 0; i < arrInteger.length; i++) {
            arrInt[i] = arrInteger[i];
        }

    }
}
